from windoh.control import Control

class Label(Control):
    def __init__(self, label=None, **kwargs):
        Control.__init__(self, **kwargs)
        self._label = label

    def _set_label(self, label):
        self._label = label
        self.dispatch_event('on_label_change')
    def _get_label(self):
        return self._label
    label = property(_get_label, _set_label)

    def on_label_change(self):
        self.set_dirty()

Control.register_event_type('on_label_change')
    
